import {handler, view, ViewGroup} from "adajs";
import LodgeService from "./state.js";
import Bar from "../../../controls/bar";
import List from "./../../../controls/lists";

@view({
    className: "lodge",
    template: "./template.html",
    style: "./style.scss",
    dataset: {
        service: LodgeService
    }
})
class Lodge extends ViewGroup {
    tags() {
        return {
            bar: Bar,
            list: List
        }
    }

    @handler("bar-add")
    barAdd({data}) {
        this.dispatchEvent("gotoPage","/my/life/aboard/goaboard");
    }
}

export default Lodge;